<!DOCTYPE html>
<html>
    
    <head>
        <meta charset="utf-8">
        <title>
            关爱帮科技 v1.0
        </title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="format-detection" content="telephone=no">
        <link rel="stylesheet" href="./css/x-admin.css" media="all">
        
        <!-- 引入jquery -->
		<script src="plugins/jQuery/jquery-2.2.3.min.js"></script>
		<link rel="stylesheet" href="plugins/bootstrap/css/bootstrap.min.css">
		<!-- 引入 angular 文件 -->
		<script type="text/javascript" src="plugins/angularjs/angular.min.js"></script>
		<!-- 分页组件结束 -->
		<!-- 引入 angularjs 分页组件 和 样式 -->
		<script src="plugins/angularjs/pagination.js"></script>
		<link rel="stylesheet" href="plugins/angularjs/pagination.css">
		<!-- 分页组件结束 -->
		<!-- 引入 angularJS 外部 js 文件 -->
		<!-- 公共基础 分页 模块 -->
		<script type="text/javascript" src="js/base.js"></script>
		<script type="text/javascript" src="js/base_pagination.js"></script>
		<!-- 引入 文章 服务层 -->
		<script type="text/javascript" src="js/service/adminService.js"></script>
		<!-- 引入公共 基础controller 控制层 -->
		<script type="text/javascript" src="js/controller/baseController.js"></script>
		<!-- 引入brandController 控制层 -->
		<script type="text/javascript" src="js/controller/adminController.js"></script>
    </head>
    
    <body style="background-color: #393D49" ng-app="tilong" ng-controller="adminController">
        <div class="x-box">
            <div class="x-top">
                <i class="layui-icon x-login-close">
                    &#x1007;
                </i>
                <ul class="x-login-right">
                    <li style="background-color: #F1C85F;" color="#F1C85F">
                    </li>
                    <li style="background-color: #EA569A;" color="#EA569A">
                    </li>
                    <li style="background-color: #393D49;" color="#393D49">
                    </li>
                </ul>
            </div>
            <div class="x-mid">
                <!-- <div class="x-avtar">
                    <img src="./images/logo.png" alt="">
                </div> -->
                <div class="input">
                    <form class="layui-form">
                        <div class="layui-form-item x-login-box">
                          <!--   <label for="username" class="layui-form-label">
                                <i class="layui-icon">&#xe612;</i>
                            </label> -->
                            <div class="layui-input-inline">
                                <input type="text" id="username" name="username" required="" lay-verify="username"
                                autocomplete="off" placeholder="username " class="layui-input" />
                            </div>
                            
                        </div>
                        <div class="layui-form-item x-login-box">
                           <!-- <label for="pass" class="layui-form-label">
                                <i class="layui-icon">&#xe628;</i>
                            </label>-->
                            <div class="layui-input-inline">
                                <input type="password" id="pass" name="pass" required="" lay-verify="pass"
                                autocomplete="off" placeholder="******" class="layui-input" >
                            </div>
                        </div>
                        <div class="layui-form-item" id="loginbtn">
                            <button  class="layui-btn" lay-filter="save"  onclick="dologin()"> 
                                登 录
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
       
       <!--  <script src="layui/layui.js" charset="utf-8">
        </script>
        <script>
            layui.use(['form'],
            function() {
                $ = layui.jquery;
                var form = layui.form(),
                layer = layui.layer;

                $('.x-login-right li').click(function(event) {
                    color = $(this).attr('color');
                    $('body').css('background-color', color);
                });

                //监听提交
                form.on('submit(save)',
                function(data) {
                    console.log(data);
                    layer.alert(JSON.stringify(data.field), {
                      title: '最终的提交信息'
                    },function  () {
                        location.href = "./index.html";
                    })
                    return false;
                });

            });

        </script> -->
        <script>
        	function dologin(){
        		var username=jQuery("#username").val();
        		var password=jQuery("#pass").val();
        		$.post("../admin/login.do",{"username":username,"password":password}, function(data) {
        			 	if(data.message=="登录成功"){
        			 		location.href = "./index.html";
        			 	}else{
        			 		jQuery("#username").val("");
        	        		jQuery("#pass").val("");
        	        		alert("登录失败，请重新登录");
        			 	}
        			});
        	}
        </script>
    </body>

</html>